package com.chen.dao.bill;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.chen.pojo.Bill;
@Mapper
public interface BillDao {
	/**
	 * 澧炲姞涓�鏉¤鍗曚俊鎭�
	 * @param connection
	 * @param bill
	 * @return
	 * @throws Exception
	 */
	public int add(Bill bill)throws Exception;


	/**
	 * 鏍规嵁鏉′欢鏌ヨ璁㈠崟淇℃伅
	 * @param connection
	 * @param bill
	 * @return
	 * @throws Exception
	 */
	public List<Bill> getBillList(@Param("productName")String productName,@Param("providerId") String providerId,@Param("isPayment") String isPayment,@Param("form") int currentPageNo,@Param("pageSize") int pageSize)throws Exception;
	/**
	 * 根据条件查询商品的记录数
	 * @param productName
	 * @param providerId
	 * @param isPayment
	 * @return
	 * @throws Exception
	 */
	public int getBillCountList(@Param("productName")String productName,@Param("providerId") String providerId,@Param("isPayment") String isPayment) throws Exception;
	
	/**
	 * 鍒犻櫎涓�鏉¤鍗曚俊鎭�
	 * @param connection
	 * @param delId
	 * @return
	 * @throws Exception
	 */
	public int deleteBillById(String delId)throws Exception; 
	
	
	/**
	 * 鏌ョ湅涓�鏉¤鍗曚俊鎭�
	 * @param connection
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public Bill getBillById(String id)throws Exception; 
	
	/**
	 * 淇敼璁㈠崟淇℃伅
	 * @param connection
	 * @param bill
	 * @return
	 * @throws Exception
	 */
	public int modify(Bill bill)throws Exception;

	/**
	 * 鏍规嵁渚涘簲鍟唅d鏌ユ壘璁板綍鏁�
	 * @param connection
	 * @param providerId
	 * @return
	 * @throws Exception
	 */
	public int getBillCountByProviderId(String providerId)throws Exception;
	/**
	 * 鏌ヨ鎵�鏈夎鍗曚俊鎭�
	 * @return
	 * @throws Exception 
	 */
	public List<Bill> getBillListAll() throws Exception;
	/**
	 * 鏌ヨ鎬昏褰曟暟
	 * @param connection
	 * @return
	 * @throws Exception
	 */
	public int getBillCount() throws Exception;
}
